package com.wpf.test01;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class demo02 {
    public static void main(String[] args) {
        try {
            test1();
        } catch (ParseException e) {
            System.out.println("时间内容不合法");
            throw new RuntimeException(e);
        } catch (FileNotFoundException e) {
            System.out.println("文件内容不存在");
            throw new RuntimeException(e);
        }
    }

    public static void test1() throws ParseException, FileNotFoundException {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date d = sdf.parse("2011-11-11 11:11:11");
        System.out.println(d);
        test2();
    }
    public static void test2() throws FileNotFoundException {
        InputStream  is = new FileInputStream("C:\\Users\\HMS\\Desktop\\拨号上网.txt");

    }
}
